package com.tebiecloud.base.server.service.impl;

import com.tebiecloud.base.client.model.RateLimitApi;
import com.tebiecloud.base.client.model.entity.GatewayRateLimitApi;
import com.tebiecloud.base.server.mapper.GatewayRateLimitApiMapper;
import com.tebiecloud.base.server.service.GatewayRateLimitApiService;
import com.tebiecloud.common.mybatis.base.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 开放网关-流量控制-API接口 服务实现类
 * @author tebie
 * @date 2019-08-01
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class GatewayRateLimitApiServiceImpl extends BaseServiceImpl<GatewayRateLimitApiMapper, GatewayRateLimitApi> implements GatewayRateLimitApiService {

    @Autowired
    private GatewayRateLimitApiMapper gatewayRateLimitApiMapper;

    /**
     * 查询接口流量限制
     * @return
     */
    @Override
    public List<RateLimitApi> findRateLimitApiList() {
        List<RateLimitApi> list = gatewayRateLimitApiMapper.selectRateLimitApi();
        return list;
    }

}
